<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
            <li>
			用户id：<input type="text" name="userId"/>
        </li>
	            <li>
			交易价格：<input type="text" name="tradePrice"/>
        </li>
	            <li>
			交易数量：<input type="text" name="tradeAmount"/>
        </li>
	            <li>
			交易类型(1买，2卖)：<input type="text" name="tradeType"/>
        </li>
	            <li>
			成交价格：<input type="text" name="dealPrice"/>
        </li>
	            <li>
			成交总价：<input type="text" name="dealTotalPrice"/>
        </li>
	            <li>
			交易状态(1交易中,2已成交,3已取消)：<input type="text" name="tradeState"/>
        </li>
	    		<li class="select-time">
			<label>完成时间： </label>
			<input type="text" class="date-input" id="startFinishTime" placeholder="开始" name="params[beginFinishTime]"/>
			<span>-</span>
			<input type="text" class="date-input" id="endFinishTime" placeholder="结束" name="params[endFinishTime]"/>
		</li>
	            <li>
			删除标志（0代表存在 1代表删除）：<input type="text" name="delFlag"/>
        </li>
	            <li>
			创建者：<input type="text" name="createBy"/>
        </li>
	    		<li class="select-time">
			<label>创建时间： </label>
			<input type="text" class="date-input" id="startCreateTime" placeholder="开始" name="params[beginCreateTime]"/>
			<span>-</span>
			<input type="text" class="date-input" id="endCreateTime" placeholder="结束" name="params[endCreateTime]"/>
		</li>
	            <li>
			更新者：<input type="text" name="updateBy"/>
        </li>
	    		<li class="select-time">
			<label>更新时间： </label>
			<input type="text" class="date-input" id="startUpdateTime" placeholder="开始" name="params[beginUpdateTime]"/>
			<span>-</span>
			<input type="text" class="date-input" id="endUpdateTime" placeholder="结束" name="params[endUpdateTime]"/>
		</li>
	            <li>
			备注信息：<input type="text" name="remark"/>
        </li>
								<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm" id="toolbar" role="group">
				<a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="system:wdyHuobiTrade:add">
					<i class="fa fa-plus"></i> 添加
				</a>
				<a class="btn btn-primary btn-edit disabled" onclick="$.operate.editFull()" shiro:hasPermission="system:wdyHuobiTrade:edit">
					<i class="fa fa-edit"></i> 修改
				</a>
				<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:wdyHuobiTrade:remove">
					<i class="fa fa-remove"></i> 删除
				</a>
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:wdyHuobiTrade:export">
						<i class="fa fa-download"></i> 导出
				 </a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:wdyHuobiTrade:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:wdyHuobiTrade:remove')}]];
        var prefix = ctx + "system/wdyHuobiTrade";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "火币委托交易",
		        showExport: false,
                sortName: "createTime",
                sortOrder: "desc",
                columns: [{
		            checkbox: true
		        },
				{
					field : 'id', 
					title : 'id',
					visible: false
				},
				{
					field : 'userId', 
					title : '用户id',
					sortable: true
				},
				{
					field : 'tradePrice', 
					title : '交易价格',
					sortable: true
				},
				{
					field : 'tradeAmount', 
					title : '交易数量',
					sortable: true
				},
				{
					field : 'tradeType', 
					title : '交易类型(1买，2卖)',
					sortable: true
				},
				{
					field : 'dealPrice', 
					title : '成交价格',
					sortable: true
				},
				{
					field : 'dealTotalPrice', 
					title : '成交总价',
					sortable: true
				},
				{
					field : 'tradeState', 
					title : '交易状态(1交易中,2已成交,3已取消)',
					sortable: true
				},
				{
					field : 'finishTime', 
					title : '完成时间',
					sortable: true
				},
				{
					field : 'delFlag', 
					title : '删除标志（0代表存在 1代表删除）',
					sortable: true
				},
				{
					field : 'createBy', 
					title : '创建者',
					sortable: true
				},
				{
					field : 'createTime', 
					title : '创建时间',
					sortable: true
				},
				{
					field : 'updateBy', 
					title : '更新者',
					sortable: true
				},
				{
					field : 'updateTime', 
					title : '更新时间',
					sortable: true
				},
				{
					field : 'remark', 
					title : '备注信息',
					sortable: true
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.editFull(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>